<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/WEB-INF/jsp/sys/css.jsp"%>
<%@ include file="/WEB-INF/jsp/sys/uploader.jsp" %>
<%@page import="com.centit.util.RequestUtil" %>

<html lang="zh-cmn-Hans">
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/plugin/css/index.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/ztree/js/jquery.ztree.all.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/plugin/js/selectTree.js"></script>
<script type="text/javascript"	src="${pageContext.request.contextPath}/modules/jdghgl/jdghgl/ctrl/azdbqry.edit.js"></script>
<style type="text/css">
.stream-main-upload-box {
        border: none;
    }

    .centit-uploader .uploaded-files li {
        padding: 10px 20px 10px 10px;
    }
</style>
</head>
<body>
	<form class="layui-form" action="" style="padding: 10px"
		lay-filter="azdbqryForm">
		<input type="hidden" name="recId" id="recId" value="${object.recId}">

		<table class="viewTable">
			<tr>
				<th class="required">名称</th>
				<td colspan="3">
					<input type="text" name="ghName" class="layui-input" lay-verify="required" value="${object.ghName}">
				</td>
			</tr>
			
			<tr>
				<th class="required">编辑人</th>
				<td>
					<input type="text" name="ghEdituser" id="ghEdituser" class="layui-input" lay-verify="required" value="${object.ghEdituser}" readonly="readonly">
				</td>
				<th class="required">部门</th>
				<td>
					<input type="text" name="ghUnitcode" id="ghUnitcode" class="layui-input" lay-verify="required" value="${object.ghUnitcode}" readonly="readonly">
				</td>
			</tr>
			
			<tr>
				<th class="required">联系电话</th>
				<td>
					<input type="text" name="ghContact" class="layui-input" lay-verify="required" value="${object.ghContact}">
				</td>
				<th class="required">类型</th>
				<td>
					<select name="ghType" class="layui-input" lay-filter="ghType" id="ghType" lay-verify="required"  value="${object.ghType}">
								<option value="">--请选择--</option>
								<c:forEach items="${cp:DICTIONARY('GHTYPE')}" var="row">
				         			<option value="${row.dataCode }" <c:if test="${object.ghType eq row.dataCode }">selected="selected"</c:if> >${row.dataValue }</option>
				   				</c:forEach>
					</select>
				</td>
			</tr>
			
			<tr>
				<th class="required">发布时间</th>
				<td>
					<input type="text" name="ghFbdate" id="ghFbdate" class="layui-input" lay-verify="required" value="<fmt:formatDate value='${object.ghFbdate}' pattern='yyyy-MM-dd'/>">
				</td>
				<th class="required">更新时间</th>
				<td>
					<input type="text" name="ghGxdate" id="ghGxdate" class="layui-input" lay-verify="required" value="${object.ghGxdate}" readonly="readonly">
				</td>
			</tr>
			
			<tr>
				<th>概述</th>
				<td style="height:100px;" colspan="3">
					<div class="layui-input-block" style="margin-left: 0;">
						<textarea name="ghDesc" placeholder="请输入内容" class="layui-textarea">${object.ghDesc}</textarea>
					</div>
				</td>
			</tr>
			<tr>
				<th>备注</th>
				<td style="height:100px;" colspan="3">
					<div class="layui-input-block" style="margin-left: 0;">
						<textarea name="ghMark" placeholder="请输入内容" class="layui-textarea">${object.ghMark}</textarea>
					</div>
				</td>
			</tr>
			<tr>
	         <th>附件</th>
	                    <td colspan="3">
	                        <div class="layui-input-inline tdcontent" >
	                        <input type="hidden"  id="ghFj" name="ghFj"  value="${object.ghFj}" />
	                        </div>
	                    </td>
	            </tr>
		</table>
		<div style="text-align: center; margin-top: 20px">
			<button class="layui-btn" lay-submit="" lay-filter="formSubmit">提交</button>
			<button class="layui-btn" lay-submit="" lay-filter="saveSubmit">保存</button>
			<button class="layui-btn layui-btn-primary" onclick="CloseWin()">关闭</button>
		</div>
	</form>
	<script>
var basePath= "${pageContext.request.contextPath}";
</script>

 <script type="text/javascript">
 window.UploaderPath='${cp:SYS_VALUE("uploaderpath")}/';
	index = setInterval(setUpload, '1000');
	function setUpload() {
	    try {
	    	  if (typeof $('#ghFj', null).uploader === "function") { 
	              clearInterval(index);
	              $('#ghFj', null).uploader({
	                  UploaderPath: window.UploaderPath,           
	                  ViewContextPath: window.UploaderPath,
	                  info: {
	                      optId: 'applyAdd'    
	                  }
	              });
	          } else { 
	          }
	    	 /* 	 //如果是查看的需要去除附件中的操作按钮
	            $(".centit-uploader").find("button").remove();//只读时候去除上传按钮，编辑新增此行代码去掉
	            $("#i_select_files_upload_demo_0").find("button").remove();
	            $("#i_select_files_upload_demo1_0").find("button").remove(); */
	      } catch (e) {
	      }
	  }
 </script>
</body>
</html>
